1. Field of the Invention
The present invention generally relates to a color recognition method. More particularly, the present invention relates to a rapid color recognition method without division operation.
2. Description of Related Art
With the rapid development of electronic technology, a variety of electronic devices such as display device, printer, mobile phone or image sensor device may display colored images. Conventionally, when a digital image captured by, for example, an image sensor is processed, in general the image data of each pixel of the digital image is decomposed into basic color component data including such as red, blue and green color component data. For example, in the color recognition process, such as the color recognition of toy or color code of resistor, the corresponding color code is recognized and outputted according to the red, blue or green color component data of the basic color component data of each pixel.
In general, in the color recognition process, if the color code is recognized only according to the red, blue or green color component data of each pixel of the digital image, the brightness of each pixel of the digital image will cause erroneous recognition. Therefore, generally the red, blue and green color component data of each pixel of the digital image are generated by normalization operation, and then the color code is recognized according to the normalized image data. Therefore, the brightness of the image data is considered and the error of the color recognition is avoided. Assuming that the normalized red, blue and green color component data of the original red, blue and green color component data R, G and B are represented by r, g and b respectively, a conventional equation of color normalization may be expressed as follows:r=Rk/(Rk+Gk+Bk)g=Gk/(Rk+Gk+Bk)b=B2/(Rk+Gk+Bk)
It is noted that k is the order of the normalization operation, in general the higher the order, the more complicated the normalization operation is. Therefore, generally the k value is preseted as 1to reduce the complexity of the operation, i.e., only the first order normalized red, blue and green color component data is calculated. However, since the normalization operation includes a division operation, and the pixel number of the frame of the digital image is increased as the development of the electronic technology, the complexity of the normalization operation is increased. Therefore, the conventional normalization operation will be more difficult.